<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>每日资讯</title>
    <link href="../static/css/bootstrap5.min.css" th:href="@{/css/bootstrap5.min.css}" rel="stylesheet"/>
    <style>

        .news-item {
            margin-bottom: 20px;
            border: 1px solid #ddd;
            padding: 15px;
            border-radius: 5px;
        }

        .news-content {
            display: none;
        }
    </style>
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <div class="container">
        <a class="navbar-brand" href="/stock/getAverageHoldingPercentage">首页</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
                aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" aria-current="page" href="/stock/news">每日资讯</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" aria-current="page" href="/chat">AI问题解答</a>
                </li>
                <li class="nav-item" shiro:notAuthenticated>
                    <a class="nav-link" href="/login">登录</a>
                </li>
                <li class="nav-item" shiro:notAuthenticated>
                    <a class="nav-link" href="/register">注册</a>
                </li>
            </ul>
            <div id="userInfo" class="ms-auto" shiro:authenticated>
                <span class="nav-link" th:text="'欢迎，' + ${sysUser.userName}">用户昵称</span>
                <button class="nav-link btn btn-link" id="logoutButton">退出登录</button>
            </div>
        </div>

    </div>
</nav>
<div class="container">
    <h1 class="text-center mt-4 mb-4">新闻列表</h1>

    <div class="row">
        <div class="col-md-8 offset-md-2">
            <!-- 新闻项 1 -->
            <div class="news-item">
                <h3 class="news-title">新闻标题 1</h3>
                <p class="news-summary">这是新闻 1 的摘要内容，简要介绍新闻的主要信息。</p>
                <p class="news-date">发布时间：2025-03-05</p>
                <div class="news-content">
                    <p>这是新闻 1 的详细内容，包含更多的信息和细节。</p>
                </div>
            </div>
            <!-- 新闻项 2 -->
            <div class="news-item">
                <h3 class="news-title">新闻标题 2</h3>
                <p class="news-summary">这是新闻 2 的摘要内容，简要介绍新闻的主要信息。</p>
                <p class="news-date">发布时间：2025-03-05</p>
                <div class="news-content">
                    <p>这是新闻 2 的详细内容，包含更多的信息和细节。</p>
                </div>
            </div>
            <!-- 可以添加更多新闻项 -->
        </div>
    </div>
</div>
<script src="../../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap5.min.js}"></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script>

</script>
</body>
</html>
